import config from "@/config";
import http from "@/utils/request";
// 获取设备页面所有信息
export const getData = {
	url: `${config.BASE_URL}/political/getpol`,
	name: "待审核-获取所有信息",
	get: async function () {
		return await http.get(this.url);
	},
};
// 删除政审信息
export const deleteData = {
	url: `${config.BASE_URL}/political/delete`,
	name: "待审核-删除单个列表信息",
	delete: async function () {
		return await http.delete(this.url);
	},
};
// 批量删除政审信息
export const deleteAllData = {
	url: `${config.BASE_URL}/political/deletelist`,
	name: "待审核-批量删除列表信息",
	delete: async function () {
		return await http.delete(this.url);
	},
};
// 下发走访任务
export const sendData = {
	url: `${config.BASE_URL}/political/send`,
	name: "待审核-下发走访任务",
	post: async function (params = "") {
		return await http.post(this.url + params);
	},
};
// 导出数据功能
export const deriveData = {
	url: `${config.BASE_URL}/political/exportexc`,
	name: "待审核-导出功能",
	get: async function () {
		return await http.get(this.url);
	},
};
// 姓名查找功能
export const searchData = {
	url: `${config.BASE_URL}/political/find`,
	name: "待审核-姓名查找功能",
	post: async function (params = "") {
		return await http.post(this.url + params);
	},
};
// 高级检索
export const surperSearch = {
	url: `${config.BASE_URL}/political/search`,
	body: {
		batch: "",
		sex: "",
		schoolName: "",
		householdType: "",
		bingyiPlace: "",
		cultureProgram: "",
	},
	name: "待审核-高级检索",
	post: async function () {
		return await http.post(this.url, this.body);
	},
};
// 编辑功能
export const updatadata = {
	url: `${config.BASE_URL}/political/update`,
	body: {
		age: "",
		batch: "",
		bingyiPlace: "",
		cultureProgram: "",
		cultureStandard: "",
		educationReview: "",
		familyDetail: "",
		householdType: "",
		idCard: "",
		isOrderSoldiers: "",
		leftEyesight: "",
		loginId: "",
		name: "",
		nation: "",
		phone: "",
		sex:"",
		professionCode: "",
		professionSistuation: "",
		professionTitle: "",
		professionType: "",
		registTime: "",
		rightEyesight: "",
		schoolName: "",
		tall: "",
		weight: "",
		year: "",
	},
	name:"待争胜-编辑功能",
	put:async function() {
		return await http.put(this.url,this.body)
	}
};
